#ifndef TLIST_H
#define TLIST_H

#ifndef STRICT
#define STRICT
#endif

#include "common_include.h"

struct TListObj {
	TListObj *prior, *next;
};

class TList {
protected:
	TListObj	top;

public:
	TList(void);
	virtual void		AddObj(TListObj *obj);
	static  void		DelObj(TListObj *obj);
	virtual TListObj	*TopObj(void);
	virtual TListObj	*NextObj(TListObj *obj);
};

#define FREE_LIST	0
#define USED_LIST	1
#define	RLIST_MAX	2
class TRecycleList {
protected:
	char	*data;
	TList	list[RLIST_MAX];

public:
	TRecycleList(int init_cnt, int size);
	~TRecycleList();
	TListObj *GetObj(int list_type);
	void PutObj(int list_type, TListObj *obj);
};

struct AddrObj : public TListObj {
	ULONG	addr;
	int		portNo;
};

struct UrlObj : public TListObj {
	char	protocol[MAX_NAMEBUF];
	char	program[MAX_PATH];
};


#endif